Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SetComponentData to simplify code and improve coverage #2360

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Apr 5, 2024

🦟 Bug fix

Split out from #2228

Summary

There are several places in our code that can be simplified by using EntityComponentManager::SetComponentData to create a component for the specified entity if the component doesn't already exist. I initially made these improvements in #2228 but am splitting them out here and back porting to harmonic. There should be no behavior changes from this PR, just more concise code.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@scpeters scpeters requested a review from mjcarroll as a code owner April 5, 2024 07:09
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Apr 5, 2024
@scpeters
Copy link
Member Author

scpeters commented Apr 5, 2024

ABI checker passed though it didn't update the github status:

@scpeters
Copy link
Member Author

scpeters commented Apr 5, 2024

I believe the test failures are unrelated to the systems modified here, merging

@scpeters scpeters merged commit f8add56 into gz-sim8 Apr 5, 2024
5 of 9 checks passed
@scpeters scpeters deleted the scpeters/use_set_component_data_8 branch April 5, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants